{% extends "base.html" %}

{% block title %}后台管理系统——用户一览{% endblock %}

{% block head %}
    {{ super() }}
    <style>
        .avatar {
            width: 32px;
            height: 32px;
        }
    </style>
{% endblock %}

{% block page_content %}
    <table class="table table-striped table-hover table-bordered">
        <caption>用户信息</caption>
        <tr class="info">
            <td></td>
            <td>用户名</td>
            <td>用户邮箱</td>
            <td>用户组</td>
            <td>注册时间</td>
            <td>最后登录时间</td>
        </tr>
        {% for user in users %}
            <tr>
                <td align="center" valign="middle"><img class="avatar" src="{{ user.avatar }}"></td>
                <td>{{ user.username }}</td>
                <td>{{ user.email }}</td>
                <td>{{ user.role.name }}</td>
                <td>{{ user.member_since }}</td>
                <td>{{ user.last_seen }}</td>
            </tr>
        {% endfor %}
    </table>
{% endblock %}
